package com.usian.wemedia.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.usian.model.media.pojos.WmNewsMaterial;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

import java.util.ArrayList;

@Mapper
public interface WmNewsMaterialMapper extends BaseMapper<WmNewsMaterial> {

    @Delete("delete from wm_news_material where news_id = #{id}")
    void deleteByNewsId(Integer id);

    void saveRelations(@NotNull ArrayList<String> list, @Nullable Integer newsId, @Nullable Short type);
}